// 引入mongoose第三方模块
const mongoose = require('mongoose');

require("./model")


// 连接数据库mongooseDemo,没有会自动生成
mongoose.connect('mongodb://localhost/LearningProblem', {
        useNewUrlParser: true,
        useUnifiedTopology: true
    })
    .then(() => console.log('数据库连接成功'))
    .catch(() => console.log('数据库连接失败'))
